package com.ellecity06.cwhiskymall.ui.search

import com.ellecity06.common.base.view.IUiState
import com.ellecity06.cwhiskymall.bean.TagItem
import com.ellecity06.cwhiskymall.bean.response.GoodResponse
import com.ellecity06.cwhiskymall.bean.response.SearchDiscoveryResponse

/**
 * @author ellecity06
 * @time 2024/11/1 17:14
 * @des
 */
sealed class SearchState : IUiState {
    data class HistoryList(val list: MutableList<TagItem>) : SearchState()
    data class RefreshSuccess(val list: List<GoodResponse>, val hasMore: Boolean) : SearchState()
    data class LoadMoreSuccess(val list: List<GoodResponse>, val hasMore: Boolean) : SearchState()

    /**
     * 没有更多
     */
    object NoMore : SearchState()

    /**
     * 加载失败
     */
    object LoadError : SearchState()

    data class ShowResultFragment(val keyword:String) : SearchState()

    /**
     * 搜索发现
     */
    data class SearchDiscoverList(val list: List<SearchDiscoveryResponse.HotSearchTerm>) : SearchState()
    /**
     * 热门搜索顶部
     */
    data class SearchHotTopList(val list: List<SearchDiscoveryResponse.HotSearchSpuVo>) : SearchState()

    /**
     * 热门搜索顶部
     */
    data class SearchHotList(val list: List<SearchDiscoveryResponse.HotSearchSpuVo>,val hasMore: Boolean) : SearchState()
    data class SearchHotMoreList(val list: List<SearchDiscoveryResponse.HotSearchSpuVo>,val hasMore: Boolean) : SearchState()
}
